import { Controller, Get, Post, Body, Patch, Param, Delete, Query } from '@nestjs/common';
import { CustomFlowSubmitService } from './custom-flow-submit.service';
import { CreateCustomFlowSubmitDto } from './dto/create-custom-flow-submit.dto';
import { UpdateCustomFlowSubmitDto } from './dto/update-custom-flow-submit.dto';

@Controller('custom-flow-submit')
export class CustomFlowSubmitController {
  constructor(private readonly customFlowSubmitService: CustomFlowSubmitService) { }

  @Post()
  create(@Body() createCustomFlowSubmitDto: CreateCustomFlowSubmitDto) {
    return this.customFlowSubmitService.create(createCustomFlowSubmitDto);
  }

  @Get()
  findAll(@Query() querys) {
    return this.customFlowSubmitService.findAll(querys);
  }

  @Get(':id')
  findOne(@Param('id') id: string) {
    return this.customFlowSubmitService.findOne(id);
  }

  @Get('findCurFlow')
  findCurFlow(@Query() querys) {
    return this.customFlowSubmitService.findCurFlow(querys.matterSubmitId);
  }

  @Patch(':id')
  update(@Param('id') id: string, @Body() updateCustomFlowSubmitDto: UpdateCustomFlowSubmitDto) {
    return this.customFlowSubmitService.update(id, updateCustomFlowSubmitDto);
  }

  @Delete(':id')
  remove(@Param('id') id: string) {
    return this.customFlowSubmitService.remove(id);
  }
}
